﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lanting.Utilities.StringUtils
{
    public class DecimalMethods
    {
        #region 常用方法-浮点数相乘
        public static Double Function_DoubleMultiply(Double d1, Double d2)
        {
            Decimal d_d1 = (Decimal)d1;
            Decimal d_d2 = (Decimal)d2;
            return Decimal.ToDouble(Decimal.Multiply(d_d1, d_d2));
        }
        #endregion

        #region 常用方法-浮点数相加
        public static Double Function_DoubleAdd(Double d1, Double d2)
        {
            Decimal d_d1 = (Decimal)d1;
            Decimal d_d2 = (Decimal)d2;
            return Decimal.ToDouble(Decimal.Add(d_d1, d_d2));
        }
        #endregion

        #region 常用方法-浮点数相减
        public static Double Function_DoubleDel(Double d1,Double d2)
        {
            Decimal d_d1 = (Decimal)d1;
            Decimal d_d2 = (Decimal)d2;
            return Decimal.ToDouble(Decimal.Subtract(d_d1, d_d2));
        }
        #endregion
    }
}
